<template>
  <li class="item">
    <router-link :to="`/songitem/${item.id}`">
      <img :src="item.picUrl" />
      <p>{{ item.playCount | formatNum }}</p>
      <h6>{{ item.name }}</h6>
    </router-link>
  </li>
</template>

<script>
export default {
  props: {
    item: Object,
  },
  filters: {
    formatNum(value) {
      return (value / 10000).toFixed(1) + "万";
    },
  },
};
</script>

<style lang="less" scoped>
.item {
  width: 33%;
  position: relative;
  margin-bottom: 12px;
  img {
    width: 100%;
  }
  p {
    position: absolute;
    right: 5px;
    top: 2px;
    z-index: 3;
    padding-left: 13px;
    color: #fff;
    font-size: 12px;
    background-position: 0;
    text-shadow: 1px 0 0 rgb(0, 0, 0);
    background-image: url();
    background-repeat: no-repeat;
    background-size: 11px 10px;
  }
  h6 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 6px 2px 0px 6px;
    min-height: 30px;
    line-height: 1.2;
    font-size: 13px;
    font-weight: 400;
    color: black;
  }
}
.zhanwei{
    height: 10px;
    background-color: black;
  }
</style>